<!DOCTYPE html>
<html lang="en" xmlns:el-col="http://www.w3.org/1999/html">

<head>
    <meta charset="UTF-8">
    <title>复盘数据管理</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
          integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!--<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>-->
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vxe-table/lib/index.css">
    <!-- 引入脚本 -->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <!--<script src="https://cdn.jsdelivr.net/npm/el-table@2.5.7/lib/index.js"></script>-->
    <style scoped>
        /* 用来设置当前页面element全局table的内间距 */
        .margintop {
            margin-top: 100px;
        }

        #table .center {
            text-align: center;
        }

        #table table tbody td input {
            border: none;
            outline: none;
            width: 100%;
        }

        .el-table__row td {
            padding: 2px;
        }

        .el-upload.el-upload--text > input {
            display: none;
        }

        /*div.ant-table-scroll {*/
            /*max-height: 400px !important;*/
        /*}*/

        /*div.ant-table-scroll > div{*/
        /*height: 300px !important;*/
        /*}*/
        /*.myPagination {*/
            /*display: none;*/
        /*}*/

        /*#table > div:nth-child(5) > div:nth-child(3) > div > div.ant-table-scroll > div {*/
            /*height: 400px !important;;*/
        /*}*/

        /*#table > div:nth-child(5) > div:nth-child(2) > div > div.ant-table-scroll > div {*/
            /*height: 400px !important;;*/
        /*}*/

        /*.ant-table-scroll > div {*/
        /*height: 100px;*/
        /*}*/
    </style>
</head>
<body>
<div class="container margintop" id="table">
    <!--原始的:-->
    <!--<el-input v-model="a" @keyup.enter.native="change_ref"></el-input>-->
    <!--计算后的:-->
    <!--<el-input v-model="b"></el-input>-->
    <el-row>
        <el-col :span="4">
            <el-input type="text" name="content" v-model="kw_ctr"
                      placeholder="关键字"
                      @keyup.enter.native="search_kw"/>
        </el-col>
        <el-col :span="5" style="margin-left: 20px">
            <el-button type="warning" @click="search_kw">
                搜索
            </el-button>
        </el-col>
        <el-col :span="6">
            <el-upload
                    action="api/file-upload-ctr"
                    accept=".xls,.xlsm,.xlsx"
                    :on-success="handleSuccess"
                    :limit="1"
                    :file-list="fileList">
                <el-button type="primary">上传文件</el-button>
                <div slot="tip" class="el-upload__tip">只能上传xls/xlsm/xlsx文件</div>
            </el-upload>
        </el-col>
        <el-button-group>
            <el-button type="info" @click="append_ctr">
                新增
            </el-button>
            <el-button type="info" @click="confirm_ctr">
                确认记录
            </el-button>
            <el-button type="info" @click="cancel_ctr">
                取消
            </el-button>
        </el-button-group>
    </el-row>
    <el-divider></el-divider>
    <el-row style="height: 400px;">
        <el-col :span="4">
            <!--<ul class="infinite-list" style="overflow:auto;width: 100px">-->
            <!--<li v-for="(item,index) in a" class="infinite-list-item">{{ item }}</li>-->
            <!--</ul>-->
            <el-table
                    ref="multipleTable"
                    height="400px"
                    border
                    highlight-current-row
                    tooltip-effect="dark"
                    :data="advice_ctr"
                    :row-style="{height:'15px'}"
            >
                <el-table-column>
                    <template slot-scope="scope">
                        <el-input
                                v-model="scope.row"
                                disabled
                                @click.native="select_ctr(scope.row)">
                        </el-input>
                    </template>
                </el-table-column>
            </el-table>
        </el-col>
        <el-col :span="18">
            <el-table
                    ref="multipleTable"
                    height="400px"
                    border
                    highlight-current-row
                    tooltip-effect="dark"
                    :data="data_ctr"
                    stripe
                    v-bind:style="rela_tags_style"
            >
                <!--style="width: 100%"-->
                <el-table-column type="selection"></el-table-column>
                <el-table-column
                        label="相关的标签"
                        width="150"
                        sortable
                prop="tag">
                    <template slot-scope="scope">
                        <el-input
                                v-model="scope.row.tag"
                                >
                        </el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="历史涨停次数"
                        width="150"
                        sortable
                        prop="cur_up_times">
                    <template slot-scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.cur_up_times" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="关联度"
                        width="150"
                        sortable
                        prop="rela_ratio"
                        >
                    <template slot-scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.rela_ratio" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="标签涨停次数"
                        width="150"
                        sortable
                        prop="cur_count">
                    <template slot-scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.cur_count" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column label="操作" fixed="right" width="100px">
                    <template slot-scope="scope">
                        <el-button
                                size="mini"
                                type="danger"
                                @click="delete_ctr(scope.$index, scope.row)">删除
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-col>
        <el-col :span="18">
            <el-table
                    ref="multipleTable"
                    height="400px"
                    border
                    highlight-current-row
                    tooltip-effect="dark"
                    :data="data_ctr"
                    v-bind:style="rela_codes_style"
            >
                <el-table-column type="selection"></el-table-column>
                <el-table-column
                        label="名称"
                        width="150"
                >
                    <template scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.name" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="代码"
                        width="150"
                        sortable
                        prop="code">
                    <template scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.code" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="历史涨停次数"
                        width="150"
                        sortable
                    prop="cur_up_times">

                    <template scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.cur_up_times" size="small" style="width: 100%">
                        </el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="关联度"
                        width="150"
                        sortable
                        prop="rela_ratio">
                    <template scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.rela_ratio" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column
                        label="最近一次涨停时间"
                        width="150"
                        sortable
                prop="cur_date">
                    <template scope="scope">
                        <el-input :disabled="!scope.row.editable"
                                  v-model="scope.row.cur_date" size="small" style="width: 100%"></el-input>
                    </template>
                </el-table-column>
                <el-table-column label="操作" fixed="right" width="100px">
                    <template slot-scope="scope">
                        <el-button
                                size="mini"
                                type="danger"
                                @click="delete_ctr(scope.$index, scope.row)">删除
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </el-col>
    </el-row>
    <el-divider>
    </el-divider>
    <div style="height: 300px"></div>
</div>
</body>
</html>
<script>
    Array.prototype.indexOf = function (val) {
        for (var i = 0; i < this.length; i++) {
            if (this[i] == val) return i;
        }
        return -1;
    };
    Array.prototype.remove = function (val) {
        var index = this.indexOf(val);
        if (index > -1) {
            this.splice(index, 1);
        }
    };
    var app = new Vue({
            el: "#table",
            data: {
                APPEND_FLAG: "append",
                DELETE_FLAG: "delete",
                DELETE_AND_TR_FLAG: "tr",
                a: ['\'默认\'', '默认'],
                advice_ctr: [],
                fileList: [],
                rela_tags_style: {
                    display: "none"
                },
                rela_codes_style: {
                    display: ""
                },
                replay_data: [
                    {
                        id: 'pk'
                        , code: '4'
                        , name: 'test_tag'
                        , origin: 'test_tag_origin'
                        , tag: 'test_tag'
                        , source: 'wylh'
                        , reason: '爬虫'
                        , url: 'www.baidu.com'
                    },
                ],
                // rela_tags_ctr:[],
                rela_tags_ctr: [
                    {
                        id: 3,
                        tag: "3D打印", enable: -1, fresh: -1, stroage_date: "2019-10-01", to: "3D打印",
                        source: "machine",
                        link: "www.baidu.com",
                    },
                    {
                        id: 4,
                        tag: "5G", enable: 1, fresh: -1, stroage_date: "2019-10-01", to: "5G",
                        source: "machine",
                        link: "www.baidu.com"
                    },
                    {
                        id: 6,
                        origin: "ETC",
                        stroage_date: "2019-10-01",
                        to: "ETC",
                        source: "machine",
                        enable: -1,
                        fresh: -1,
                        link: "www.baidu.com"
                    }],
                // rela_codes_ctr:[],
                rela_codes_ctr: [
                    {
                        code: "99999",
                        name: "system",
                        origin: "system1",
                        source: "wylh",
                        reason: "无理由",
                        link: "www.baidu.com"
                    }],
                delete_data_ctr: [],
                data_ctr:  [{
                    "id": 6475,
                    "code": "002194",
                    "name": "\u6b66\u6c49\u51e1\u8c37",
                    "origin": "\u6e56\u5317\u79fb\u52a8\u5f00\u542f\u957f\u6c5f\u4e3b\u8f745G\u65f6\u4ee3",
                    "start_date": "2020-02-20",
                    "end_date": "9999-12-31",
                    "storage_date": "2020-02-20",
                    "reason": "",
                    "link": "https://www.taoguba.com.cn/Article/1790202/1",
                    "tag": "\u6e56\u5317\u79fb\u52a8\u5f00\u542f\u957f\u6c5f\u4e3b\u8f745G\u65f6\u4ee3"
                }],
                list_backup: [],
                modified_list_: [{}],
                is_query_from_code_ctr: null,
                selected_advice: "",
                tv_ctr_rela_code: null,
                tv_ctr_rela_tags: null,
                kw_ctr: "",
                key_word_suffix: "",
                main_replay_v: true,
                ms_replay: [],
                inp: "",
                tag_advices: [],
                tableData: [{
                    date: '2016-05-02',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1517 弄'
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1519 弄'
                }, {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1516 弄'
                }]
            },
            methods: {
                formatter(row, column) {
                    return row.address;
                },
                querySearch(queryString, cb) {
                    let res = app.tag_advices.filter(function (it_) {
                        return it_['value'].toUpperCase().indexOf(queryString.toUpperCase()) > -1
                    });
                    cb(res);
                },
                query_tag_suggestion() {
                    var _this = this;
                    axios.get("/api/search-tag-advice", {params: {"kw": ""}}).then(function (value) {
                        //进行更改，保留id，进行操作
                        if (_this.parseInfo(value)) {
                            _this.$message("已加载标签");
                            _this.tag_advices = value.data.data;
                            let tp_ad = [];
                            _this.tag_advices.forEach(i => tp_ad.push({'value': i}));
                            _this.tag_advices = tp_ad
                        }
                    }).catch(function (error) {
                        app.$message({
                            message: error,
                            duration: 6000,
                            type: 'error'
                        });
                    });
                },
                handleSelect(val) {
                    console.log(val)
                },
                toggle_replay_v() {
                    this.main_replay_v = !this.main_replay_v;
                    this.re_set_data();
                    if (this.main_replay_v === true) {
                        this.refresh_replay()
                    }
                    // if (this.main_replay_v === true){
                    //     this.data_ctr = this.replay_data
                    // this.data_ctr = this.replay_data;
                    // this.list_backup = Object.assign([],this.data_ctr)
                    // }
                },
                handlerSelectionReplay(val) {
                    app.ms_replay = val
                    console.log(app.ms_replay)
                },
                handleClose(done) {
                    this.$confirm('确认隐藏？并不会自动确认信息')
                        .then(_ => {
                            let cur_list = app.data_ctr;
                            cur_list.splice(0, cur_list.length);
                            app.list_backup.forEach(i => cur_list.push(i));
                            app.main_replay_v = false;
                            this.re_set_data();
                            if (this.main_replay_v === true) {
                                this.refresh_replay()
                            }
                            done();
                        })
                        .catch(_ => {
                        });
                },
                change_ref() {
                    app.a = ['none']
                }, re_set_data() {
                    // app.is_query_from_code_ctr = null;
                    // app.rela_tags_ctr = [];
                    // app.rela_codes_ctr = [];
                    this.list_backup = [];
                    this.modified_list_ = [];
                    this.data_ctr = [];
                    this.delete_data_ctr = [];
                    this.key_word_suffix = ""
                },
                handleSuccess(response, file, fileList) {
                    let wrapper = {'data': response}
                    if (app.parseInfo(wrapper)) {
                        app.$message("上传文件成功")
                        //    清除所有状态
                        app.re_set_data();
                        app.is_query_from_code_ctr = false
                        // 补充数据
                        // 重新添加数据
                        app.rela_codes_ctr.splice(0, app.rela_codes_ctr.length);
                        app.rela_codes_ctr = response.data
                        app.data_ctr.splice(0, app.data_ctr.length);
                        app.rela_codes_ctr.forEach(i => {
                            i.editable = true;
                            i.origin = i.tag;
                            // i.source = '通达信';
                            // i.reason = '机器插入';
                            app.modified_list_.unshift(i);
                            app.data_ctr.push(i)
                        })
                    }

                },
                search_kw() {
                    //    获取请求
                    let kw = app.kw_ctr;
                    app.re_set_data();
                    var _this = this;
                    axios.get("/api/search-kw-ctr", {params: {"kw": _this.kw_ctr}}).then(function (value) {
                        //进行更改，保留id，进行操作
                        if (_this.parseInfo(value)) {
                            _this.$message("搜索请求完成");
                            _this.advice_ctr = value.data.data
                        }
                    }).catch(function (error) {
                        app.$message({
                            message: error,
                            duration: 6000,
                            type: 'error'
                        });
                    });
                    //开始和结束时清除状态
                    // 获取api数据
                },
                append_ctr() {
                    var new_row = {};
                    new_row.editable = true;
                    new_row['op_flag'] = app.APPEND_FLAG;
                    //关系补充
                    let b = app.is_query_from_code_ctr;
                    if (b == true) {
                        new_row['code'] = app.key_word_suffix
                    } else if (b == false) {
                        new_row['tag'] = app.key_word_suffix
                    }
                    app.modified_list_.unshift(new_row);
                    app.data_ctr.unshift(new_row);
                },
                delete_and_tr_ctr(index, row) {
                    row['delete_flag'] = app.DELETE_AND_TR_FLAG
                    app.delete_ctr(index, row)
                },
                delete_ctr(index, row) {
                    app.$message("删除行");
                    row['op_flag'] = app.DELETE_FLAG;
                    app.data_ctr.splice(index, 1);
                    if (app.modified_list_.indexOf(row) > -1) {
                        app.modified_list_.remove(row)
                    } else {
                        app.delete_data_ctr.unshift(row)
                    }
                },
                confirm_ctr() {
                    //复用相关东西
                    app.$message("开始保存关系");
                    //    请求成功后 重新刷新备份
                    console.log("delete: length" + app.delete_data_ctr.length + " " + JSON.stringify(app.delete_data_ctr));
                    console.log("modified_list: size :" + app.modified_list_.length + " values :" + JSON.stringify(app.modified_list_));
                    if (app.main_replay_v === true) {
                        app.$message("保存复盘数据");
                        console.log("选中的数组有:" + app.ms_replay);
                        axios.post("/api/replay-check-new", {
                            "delete": app.delete_data_ctr,
                            "check": app.ms_replay
                        }).then(function (value) {
                            //进行更改，保留id，进行操作
                            if (app.parseInfo(value)) {
                                app.ms_replay.forEach(i_ => {
                                        if (app.data_ctr.indexOf(i_) > -1) {
                                            app.data_ctr.remove(i_)
                                        }
                                    }
                                );
                                app.modified_list_ = [];
                                app.delete_data_ctr = [];
                                // app.data_ctr.forEach(i => i['editable'] = false);
                                app.list_backup = JSON.parse(JSON.stringify(app.data_ctr));
                                // Object.assign([], app.data_ctr);
                                app.$message("保存复盘数据成功");
                            }
                        }).catch(function (error) {
                            app.$message({
                                message: error,
                                duration: 6000,
                                type: 'error'
                            });
                        });
                    } else {
                        //fixme 请求服务器
                        // return;
                        axios.post("/api/ctr-batch-op", {
                            "delete_data": app.delete_data_ctr,
                            "append_data": app.modified_list_
                        }).then(function (value) {
                            //进行更改，保留id，进行操作
                            if (app.parseInfo(value)) {
                                app.modified_list_ = [];
                                app.delete_data_ctr = [];
                                app.data_ctr.forEach(i => i['editable'] = false);
                                app.list_backup = JSON.parse(JSON.stringify(app.data_ctr));
                                // Object.assign([], app.data_ctr);
                                app.$message("存储成功");

                            }
                        }).catch(function (error) {
                            app.$message({
                                message: error,
                                duration: 6000,
                                type: 'error'
                            });
                        });
                    }
                },
                //恢复变更的操作
                cancel_ctr() {
                    let cur_list;
                    cur_list = app.data_ctr;
                    app.modified_list_.splice(0, app.modified_list_.length);
                    cur_list.splice(0, cur_list.length);
                    app.list_backup.forEach(i => cur_list.push(i));
                    app.$message("恢复数据完成");
                    app.fileList.splice(0, app.fileList.length)
                    // app.Object.assign([],app.list_backup)
                },
                select_ctr(selected_value) {
                    // app.$message("选中:"+selected_value)
                    app.refresh_selected_ctr(selected_value)
                },
                refresh_replay() {
                    var _this = this;
                    return ;
                    // url_path = "";
                    //进行请求
                    axios.get("/api/replay-check-new", {}).then(function (value) {
                        //进行更改，保留id，进行操作
                        if (_this.parseInfo(value)) {
                            _this.replay_data = value.data.data;
                            _this.data_ctr = _this.replay_data
                            _this.list_backup = Object.assign([], _this.data_ctr)
                            // _this.replay_data.forEach(_ => _this.data_ctr.push(_));
                            // _this.data_ctr = _this.replay_data;
                        }
                    }).catch(function (error) {
                        _this.$message({
                            message: error,
                            duration: 6000,
                            type: 'error'
                        });
                    });
                },
                refresh_selected_ctr(selected_value) {
                    let _this = this
                    app.re_set_data();
                    app.$message("选中:" + selected_value);

                    var idx = selected_value.search(/\(code\)/i);
                    let qfc_ctr = app.is_query_from_code_ctr = idx > -1;
                    //判断是code还是tag
                    let kw = app.key_word_suffix = selected_value.replace("\(code\)", "")
                    let url_path = ""
                    //重新获取左侧的值
                    if (qfc_ctr == true) {
                        url_path = "/api/tag_rela_from_code";
                        //进行请求
                        axios.post(url_path, {"code": kw}).then(function (value) {
                            //进行更改，保留id，进行操作
                            if (_this.parseInfo(value)) {
                                _this.rela_tags_ctr = value.data.rela_tag
                                app.data_ctr.splice(0, app.data_ctr.length)
                                app.rela_tags_ctr.forEach(i => app.data_ctr.push(i));
                            }
                        }).catch(function (error) {
                            app.$message({
                                message: error,
                                duration: 6000,
                                type: 'error'
                            });
                        });
                    } else if (qfc_ctr == false) {
                            url_path = "/api/tag_rela";
                        //进行请求
                        axios.post(url_path,  {"tag":kw, "num":50}).then(function (value) {
                            //进行更改，保留id，进行操作
                            if (_this.parseInfo(value)) {
                                _this.rela_codes_ctr = value.data.rela_code;
                                app.data_ctr.splice(0, app.data_ctr.length);
                                app.rela_codes_ctr.forEach(i => app.data_ctr.push(i));
                            }
                        }).catch(function (error) {
                            app.$message({
                                duration: 6000,
                                type: 'error',
                                message: error
                            });
                        });
                        app.data_ctr = app.rela_codes_ctr
                    } else {
                    }
                },
                batch_insert_stock_relation() {
                    var _this = this;
                    axios.put("/api/cbatch", {data: _this.batch_ctr.data}).then(function (value) {
                        //进行更改，保留id，进行操作
                        if (_this.parseInfo(value)) {
                            _this.$message("批量插入股票标签关联信息成功");
                            _this.refresh_ctr_date()
                        }
                        // console.log("更新完成")
                    }).catch(function (error) {
                        app.$message({
                            type: 'error',
                            message: error,
                            duration: 6000,
                        });
                    });
                },
                GetDateStr(dd, AddDayCount = 0) {
                    dd.setDate(dd.getDate() + AddDayCount)// 获取AddDayCount天后的日期
                    var y = dd.getFullYear()
                    var m = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期，不足10补0
                    var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号，不足10补0
                    return y + '-' + m + '-' + d
                },
                parseInfo: function (value) {//对服务端请求处理
                    try {
                        var code = value.data.api_call;
                        if (code === 1)
                            return true;
                        this.$message({
                            message: value.data.message,
                            duration: 6000,
                            type: 'error'
                        });
                    } catch (e) {
                        this.$message({
                            title: '请求错误',
                            message: e,
                            duration: 6000,
                            type: 'error'
                        });

                    }
                    // this.$message("请求失败，原因：" + value.data.message);
                    return false;
                },
                // checkedOne(index, row) {
                //     //手动进行状态的变化，如果变更成功就进行变化
                //     row.checked = !row.checked
                //     this.$message("选中状态为:" + row.checked);
                //     return !row.checked
                // }
            }
            ,
            watch: {
                is_query_from_code_ctr(new_val) {
                    app.$message("监听到tag_rela属性改变");
                    if (new_val == true) {
                        app.rela_tags_style['display'] = '';
                        app.rela_codes_style['display'] = 'none'
                    } else if (new_val == false) {
                        app.rela_tags_style['display'] = 'none';
                        app.rela_codes_style['display'] = ''
                    } else {

                    }
                },
                a(nw) {
                    app.b = nw
                }
                // rela_tags_ctr: function (val) {
                //     return val
                // }
            }
            ,
            // mounted() {
            //     // 初始化查询，默认为前一天
            //     this.ruleForm.dateValue = this.timeDefault;
            // },
            computed: {
                // timeDefault() {
                //     var date = new Date();
                //     var s1 = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate());
                //     return s1;
                // }
                // keyword: {
                //     set() {
                //         console.log("compute")
                //         var keyword = this.keyword;
                //         this.tableData = this.tableData.filter(function (item) {
                //             return item.date.indexOf(keyword) > -1 || item.name.indexOf(keyword) > -1 || item.address.indexOf(keyword) > -1
                //         });
                //     }
                // }
            }
            ,
            created: function () {
                // this.main_replay_v = false;
                // this.toggle_replay_v();
                //this.refresh_replay();
                // this.re_set_data();
                // this.data_ctr = this.replay_data;
                // this.query_tag_suggestion();
                // for (let i = 0; i < 1000; i++) {
                //     this.data_ctr.push({'code': '1006'})
                // }
                // this.refresh_date();
                // this.refresh_tr_date();
                // this.refresh_ctr_date();
                // this.refresh_ts_date();
            },
            mounted() {
            }
        })
    ;
</script>